<template>
	<view class="content">
		<view class="cont">
			<view class="line" v-for="(item,index) in carList" @click="goOrder(item)">
				<view class="orderId">{{item.orderNo}}</view>
				<view class="row">
					<view class="rowLeft"> 商品：</view>
				    <view class="rowRgiht">{{item.card.cardTypeNameLabel}}{{item.card.cardTypeVersionLabel}}</view>
				</view>
				<view class="row" v-if="item.orderConf">
					<view class="rowLeft"> 配置信息：</view>
					<view class="rowRgiht">  {{JSON.parse(item.orderConf).label}}配置，{{JSON.parse(item.orderConf).value}}</view>
			    
				</view>
				<view class="row">
					<view class="rowLeft">期望发货日期：</view>
					<view class="rowRgiht">{{item.expectSendTime}}</view>
				</view>
				<view class="row">
					<view class="rowLeft">姓名：</view>
					<view class="rowRgiht">{{item.receivePersonName}}</view>
				</view>
				<view class="row" v-if="item.expressNo">
					<view class="rowLeft">快递信息：</view>
					<view class="rowRgiht">{{item.expressCode}}-{{item.expressNo}}</view>
				</view>
				
				
				
			</view>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cardNo: '',
				carList:''
			}
		},
		onLoad(opt) {
           this.cardNo=opt.cardNo
		   uni.showLoading({
		   	title: '加载中'
		   });
		   this.$http('delivery/cardOrders/list',{
		   	cardNo:this.cardNo,
		   	pageSize:99
		   },'GET').then(res => {
		   	    uni.hideLoading();
		   	    this.carList=res.rows
		   		
		    })
		},
		methods: {
           goOrder(item){
			   uni.navigateTo({
			   	url:'order?orderId='+item.orderId
			   }) 
		   }
		}
	}
</script>

<style scoped>
	.cont{
		padding: 20rpx;
	}
	.line{
		background: #ffffff;
		margin-bottom: 20rpx;
		border-radius: 10rpx;
		padding: 15rpx;
		
	}
	.orderId{
		font-size: 28rpx;
		padding-bottom: 10rpx;
	}
	.row{
		padding: 10rpx 0;
		font-size: 26rpx;
		color: #666;
		display: flex;
	}
	.rowLeft{
		width: 200rpx;
	}
	.rowRgiht{
		width: 500rpx;
	}
</style>
